<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>打印测试页面</title>
<script src="${pageContext.request.contextPath}/js/jquery-1.11.0.js" type="text/javascript" charset="utf-8"></script>
<script src="${pageContext.request.contextPath}/js/jquery.base64.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	$(function(){
		$("#btnId").click(function(){
			var modelurl=$("#modelurl").val();
			modelurl= $.base64.encode(modelurl);
			var dataurl=$("#dataurl").val();
			dataurl= $.base64.encode(dataurl);
			var isview=$("#isview").val();
			isview=$.base64.encode(isview);
			var data=modelurl+"&"+dataurl+"&"+isview;
			location.href="printComUrlProtocol://"+data;
		})
	})
</script>
</head>
<body>
模板URL:<input type="text" id="modelurl" value="<%=basePath%>model.grf" /><br />
数据URL:<input type="text" id="dataurl" value="<%=basePath%>data.jsp" /><br />
是否预览:<select id="isview">
					<option value="1">不预览</option>
					<option value="0">预览</option>
		</select>
<input type="button" id="btnId" value="打印票据" /><br />
<a href="${pageContext.request.contextPath}/printsetup.msi">如果点击打印票据后长时间无任何反应，请点击下载安装控件</a>
</body>
</html>